You are here: Custom Study Programming > Reference > Classes > Chart > Chart Methods > getTimeSeriesData

getTimeSeriesData

The getTimeSeriesData method returns an instance of TimeSeries object for a given symbol.

 

Syntax

TimeSeries getTimeSeriesData(symbol);

Parameters

symbol

Symbol string for which to retrieve the TimeSeries object for.

Return Value

This method returns a TimeSeries object filled with data for a given symbol. If no matching symbol is found, the method returns a null value.

Example

The following example retrieves TimeSeries object and displays its contents to the debug console.

 

TimeSeries timeSeries = Chart.getTimeSeriesData("IBM");

if(timeSeries != null)

{

for(var i = 0; i < timeSeries.count(); i++)

{

Debug.writeLine(i + ": " + "open: " + timeSeries.open(i) +

" high: " + timeSeries.high() +

" low: " + timeSeries.low() +

" close: " + timeSeries.close());

}

}

 


Copyright © 2006-2009 ActiveTick LLC